﻿using System;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Design;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using System.Collections.Generic;
using System.Text;

namespace ToddMcDermid.SSIS
{
    #region CLASS: HTMLTableDestinationInterface
    internal class HTMLTableDestinationInterface : IDtsComponentUI
    {
        #region Private Variables
        private IDTSComponentMetaData100 _componentMetaData;
        #endregion

        #region IDtsComponentUI Interface Methods
        public void Help(System.Windows.Forms.IWin32Window parentWindow)
        { }

        public void New(System.Windows.Forms.IWin32Window parentWindow)
        { }

        public void Delete(System.Windows.Forms.IWin32Window parentWindow)
        { }

        public bool Edit(System.Windows.Forms.IWin32Window parentWindow, Variables vars, Connections cons)
        {
            HTMLTableDestinationEditor componentEditor = new HTMLTableDestinationEditor(this._componentMetaData, vars);
            DialogResult result = componentEditor.ShowDialog(parentWindow);
            return (result == DialogResult.OK);
        }

        public void Initialize(IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider serviceProvider)
        {
            // Store the component metadata.
            this._componentMetaData = dtsComponentMetadata;
        }
        #endregion
    }
    #endregion
}
